News All Tests
Current file: /home/estudydev/workspace/MSP09/web/news/tests/class.container.inc.php
Legend: executed not executed dead code

  Coverage
  Classes Methods Lines
Total
100.00 %100.00%
100.00% 1 / 1
0.00 %0.00%
0.00% 0 / 6
8.11 %8.11%
8.11% 3 / 37
 
PlanspielContainer
100.00 %100.00%
100.00% 1 / 1
0.00 %0.00%
0.00% 0 / 6
2.86 %2.86%
2.86% 1 / 35
 public function PlanspielContainer($id, $title)
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 3
 public function show_start()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2
 public function show_end()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2
 private function get_arrow()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 17
 private function draw_start()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 8
 public function draw_end()
0.00 %0.00%
0.00% 0 / 1
0.00 %0.00%
0.00% 0 / 2


       1               1 : <script type="text/javascript">                                                                                                                                                                       
       2                 :     function colapseContent(id) {                                                                                                                                                                     
       3                 :         if(document.getElementById(id).style.display == "none") {                                                                                                                                     
       4                 :             document.getElementById(id).style.display = "";                                                                                                                                           
       5                 :         }else {                                                                                                                                                                                       
       6                 :             document.getElementById(id).style.display = "none";                                                                                                                                       
       7                 :         }                                                                                                                                                                                             
       8                 :     }                                                                                                                                                                                                 
       9                 : </script>                                                                                                                                                                                             
      10                 :                                                                                                                                                                                                       
      11               1 : <?php                                                                                                                                                                                                 
      12                 :                                                                                                                                                                                                       
      13                 : /*--------------------------------------------------------------------------+                                                                                                                         
      14                 : This file is part of eStudy.                                                                                                                                                                          
      15                 : planspiel/classes/class.container.inc.php                                                                                                                                                             
      16                 : - Modulgruppe:  Planspiel                                                                                                                                                                             
      17                 : - Beschreibung: Template Container für das Planspiel Modul                                                                                                                                           
      18                 : - Version:      0.9                                                                                                                                                                                   
      19                 : - Autor(en):    Marcel Knapp <marcel.knapp@mni.fh-giessen.de>                                                                                                                                         
      20                 : +---------------------------------------------------------------------------+                                                                                                                         
      21                 : This program is free software; you can redistribute it and/or                                                                                                                                         
      22                 : modify it under the terms of the GNU General Public License                                                                                                                                           
      23                 : as published by the Free Software Foundation; either version 2                                                                                                                                        
      24                 : of the License, or any later version.                                                                                                                                                                 
      25                 : +---------------------------------------------------------------------------+                                                                                                                         
      26                 : This program is distributed in the hope that it will be useful,                                                                                                                                       
      27                 : but WITHOUT ANY WARRANTY; without even the implied warranty of                                                                                                                                        
      28                 : MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                                                                                                                                         
      29                 : GNU General Public License for more details.                                                                                                                                                          
      30                 : You should have received a copy of the GNU General Public License                                                                                                                                     
      31                 : along with this program; if not, write to the Free Software                                                                                                                                           
      32                 : Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.                                                                                                                           
      33                 : +--------------------------------------------------------------------------*/                                                                                                                         
      34                 : /**                                                                                                                                                                                                   
      35                 :  * Template Container für das Planspiel Modul                                                                                                                                                        
      36                 :  * @package eStudy.Planspiel                                                                                                                                                                          
      37                 :  * @version 0.9                                                                                                                                                                                       
      38                 :  * @author Marcel Knapp <marcel.knapp@mni.fh-giessen.de>                                                                                                                                              
      39                 :  */                                                                                                                                                                                                   
      40                 :                                                                                                                                                                                                       
      41               1 : class PlanspielContainer {                                                                                                                                                                            
      42                 :     // Private Members                                                                                                                                                                                
      43                 :     private $title;                                                                                                                                                                                   
      44                 :     private $content;                                                                                                                                                                                 
      45                 :     private $id;                                                                                                                                                                                      
      46                 :     // Properties                                                                                                                                                                                     
      47                 :     public $width = "90%";                                                                                                                                                                            
      48                 :                                                                                                                                                                                                       
      49                 :     function PlanspielContainer($id, $title) {                                                                                                                                                        
      50                 :         // Set private Members                                                                                                                                                                        
      51               0 :         $this->title = $title;                                                                                                                                                                        
      52               0 :         $this->id = $id;                                                                                                                                                                              
      53               0 :     }                                                                                                                                                                                                 
      54                 :                                                                                                                                                                                                       
      55                 :     public function show_start () {                                                                                                                                                                   
      56                 :         // Draw the Container                                                                                                                                                                         
      57               0 :         $this->draw_start();                                                                                                                                                                          
      58               0 :     }                                                                                                                                                                                                 
      59                 :     public function show_end(){                                                                                                                                                                       
      60               0 :         $this->draw_end();                                                                                                                                                                            
      61               0 :     }                                                                                                                                                                                                 
      62                 :     private function get_arrow() {                                                                                                                                                                    
      63                 :                                                                                                                                                                                                       
      64               0 :         $start_cells = 0;                                                                                                                                                                             
      65               0 :         $count_cells = 11;                                                                                                                                                                            
      66               0 :         $start_rows = 0;                                                                                                                                                                              
      67               0 :         $count_rows = 6;                                                                                                                                                                              
      68                 :                                                                                                                                                                                                       
      69               0 :         ?><table border="0" cellspacing="0" cellpadding="0"><?                                                                                                                                        
      70                 :                                                                                                                                                                                                       
      71               0 :         for ($i = $start_rows; $i < $count_rows; $i++) {                                                                                                                                              
      72               0 :             echo "<tr>";                                                                                                                                                                              
      73               0 :             for ($n = $start_cells; $n < $count_cells; $n++) {                                                                                                                                        
      74               0 :                 if ($n >= $i && $n < ($count_cells-$i)) {                                                                                                                                             
      75               0 :                     ?><td nowrap="nowrap" style="width: 1px; height: 1px; background-color: #4E646E;"></td><?                                                                                         
      76               0 :                 } else {                                                                                                                                                                              
      77               0 :                     ?><td nowrap="nowrap" style="width: 1px; height: 1px;"></td><?                                                                                                                    
      78                 :                 }                                                                                                                                                                                     
      79               0 :             }                                                                                                                                                                                         
      80               0 :             echo "</tr>";                                                                                                                                                                             
      81               0 :         }                                                                                                                                                                                             
      82               0 :         echo "</table>";                                                                                                                                                                              
      83               0 :     }                                                                                                                                                                                                 
      84                 :                                                                                                                                                                                                       
      85                 :     private function draw_start () {                                                                                                                                                                  
      86                 :         ?>                                                                                                                                                                                            
      87               0 :         <table cellpadding="0" border="0" cellspacing="1" style="background-color: #B2C4E2; width: <?php echo $this->width; ?>;">                                                                     
      88                 :             <tr id="trHeader">                                                                                                                                                                        
      89               0 :                 <td style="width: 100%;" onclick="colapseContent('trContent<?php echo $this->id; ?>');">                                                                                              
      90                 :                     <table cellpadding="4" border="0" cellspacing="0" style="background-color: #BAD1DC; width: 100%;">                                                                                
      91                 :                         <tr>                                                                                                                                                                          
      92               0 :                             <td style="text-align:left; color: #4E646E; font-size: 14px; font-weight: bold; font-family: Verdana,Tahoma,Arial;"><?php echo $this->title; ?></td>                      
      93                 :                         </tr>                                                                                                                                                                         
      94                 :                     </table>                                                                                                                                                                          
      95                 :                 </td>                                                                                                                                                                                 
      96               0 :                 <td align="center" nowrap="nowrap" onclick="colapseContent('trContent<?php echo $this->id; ?>');" style="width: 25px; background-color: #CFE2EB; cursor: pointer; text-align:center;">
      97                 :                     <table border="0" cellpadding="0" cellspacing="0" style="width:100%;">                                                                                                            
      98               0 :                         <tr><td align="center"><?php echo $this->get_arrow(); ?></td></tr>                                                                                                            
      99                 :                     </table>                                                                                                                                                                          
     100                 :                 </td>                                                                                                                                                                                 
     101                 :             </tr>                                                                                                                                                                                     
     102               0 :             <tr id="trContent<?php echo $this->id; ?>">                                                                                                                                               
     103                 :                 <td colspan="2">                                                                                                                                                                      
     104                 :                     <table cellpadding="4" border="0" cellspacing="0" style="background-color: #F2F5FA; width: 100%;">                                                                                
     105                 :                         <tr>                                                                                                                                                                          
     106                 :                             <td style="text-align: left; color: #5F6D84; font-size: 12px; font-family: Verdana,Tahoma,Arial; padding: 14px;">                                                         
     107               0 :         <?                                                                                                                                                                                            
     108               0 :     }                                                                                                                                                                                                 
     109                 :     function draw_end() {                                                                                                                                                                             
     110                 :         ?>                                                                                                                                                                                            
     111                 :         </td>                                                                                                                                                                                         
     112                 :                         </tr>                                                                                                                                                                         
     113                 :                     </table>                                                                                                                                                                          
     114                 :                 </td>                                                                                                                                                                                 
     115                 :             </tr>                                                                                                                                                                                     
     116                 :         </table>                                                                                                                                                                                      
     117               0 :         <?                                                                                                                                                                                            
     118               0 :     }                                                                                                                                                                                                 
     119                 : }                                                                                                                                                                                                     
     120                 : ?>                                                                                                                                                                                                    

Generated by PHPUnit 3.2.21 and Xdebug 2.0.4 at Sat Nov 7 22:04:08 CET 2009.